export default {
  state: {
    show_account_view: false,//是否打开登陆页
    user_info: '',//用户信息

    show_login: true,//是否显示登陆页
    show_findpwd: false,//是否显示找回密码
    show_register: false,//是否显示注册页
    show_newpwd: false,
    community: null,// 当前社区信息
    new_pwd_type:'new',  // new/change
    new_pwd_phone:'',
    show_change_phone_view:false,
    show_change_phone_view2:false
  },
  mutations: {
    // 更新用户信息
    up_data_user(state, user) {
      state.user_info = user;
    },
    up_data_community(state, community) {
      state.community = community
    },
    login_view_init(state){
      state.show_account_view = false;
      state.show_register = false;
      state.show_login = true;
      state.show_findpwd = false;
      state.show_newpwd = false;
    },
    // 打开登陆界面
    open_account_view(state, tf) {
      state.show_account_view = tf;
    },
    // 打开注册页面
    open_register_view(state, tf) {
      state.show_register = tf;
    },
    // 打开登陆页面
    open_login_view(state, tf) {
      state.show_login = tf;
    },
    // 打开忘记密码页面
    open_findpwd_view(state, tf) {
      state.show_findpwd = tf;
    },
    // 更改输入新密码页面的类型  是新注册的还是找回密码
    change_new_pwd_type(state,type){
      state.new_pwd_type = type
    },
    change_new_pwd_phone(state,phone){
      state.new_pwd_phone = phone
    },
    // 打开填写新密码页面
    open_newpwd_view(state, tf) {
      state.show_newpwd = tf;
    },
    open_change_phone_view(state,tf){
      state.show_change_phone_view = tf;
    },
    open_change_phone_view2(state,tf){
      state.show_change_phone_view2 = tf;
    }

  }
}
